import mediarequest from '@/utils/media-request'

/*============== 图片素材相关接口开始 ====================*/
/** 图片素材列表 **/
export function getPackageImageMaterials(data) {
  return mediarequest({
    url: '/console/package/material/images',
    method: 'get',
    params: data
  })
}
/** 获取已添加图片素材的FID **/
export function getPackageReledFids(data) {
  return mediarequest({
    url: '/console/package/rel/imagefids',
    method: 'get',
    params: data
  })
}
/** 获取已添加图片素材的imgid **/
export function getPackageReledImgids(data) {
  return mediarequest({
    url: '/console/package/rel/imgids',
    method: 'get',
    params: data
  })
}
/** 添加图片素材 **/
export function packageRelImage(data) {
  return mediarequest({
    url: '/console/material/images/rel/package',
    method: 'post',
    data
  })
}
/** 删除图片素材 **/
export function deletePackageRelImage(data) {
  return mediarequest({
    url: '/console/package/rel/images',
    method: 'delete',
    data
  })
}
/*============== 图片素材相关接口结束 ====================*/

/*============== 视频素材相关接口开始 ====================*/
/** 视频素材列表 **/
export function getPackageVideoMaterials(data) {
  return mediarequest({
    url: '/console/package/material/videos',
    method: 'get',
    params: data
  })
}

/** 获取已添加视频素材的FID **/
export function getPackageReledVideoFids(data) {
  return mediarequest({
    url: '/console/package/rel/videofids',
    method: 'get',
    params: data
  })
}

/** 获取已添加视频素材的videoid **/
export function getPackageReledVideoids(data) {
  return mediarequest({
    url: '/console/package/rel/videoids',
    method: 'get',
    params: data
  })
}

/** 添加视频素材 **/
export function packageRelVideo(data) {
  return mediarequest({
    url: '/console/material/videos/rel/package',
    method: 'post',
    data
  })
}

/** 删除视频素材 **/
export function deletePackageRelVideo(data) {
  return mediarequest({
    url: '/console/package/rel/videos',
    method: 'delete',
    data
  })
}
/*============== 视频素材相关接口结束 ====================*/

export function submitPostUploadFile(data) {
  return mediarequest({
    url: '/console/cloudstorage/image/upload',
    method: 'post',
    data
  })
}
